import publishedLess from "./index.module.less";
import { useLocation, useNavigate } from "react-router-dom";

function Published() {
  const { state } = useLocation();
  const navigate = useNavigate();
  const GoBack = () => {
    navigate("/home");
  };
  return (
    <>
      <div className={publishedLess.published_content}>
        <div className="center_content">
          <div className="top_img">
            <img
              src="../../../public/img/8732fd6a30cd4808827abe39ea22e90f~tplv-k3u1fbpfcp-jj_0_0_0_0_q75.avis"
              alt=""
            />
          </div>
          <div className="center_title">
            {state.articleName ? "《" + state.articleName + "》" : ""}
          </div>
          <div className="tips">发布成功!文章审核中...</div>
          <div className="thanks">有了你的分享，稀土掘金会变得更好</div>
          <div className="goBackIndex" onClick={GoBack}>
            回到首页
          </div>
        </div>
      </div>
    </>
  );
}

export default Published;
